package com.trinhrae.shooting.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @Author: TrinhRae
 * @Package: com.trinhrae.shooting.config
 * @Project: shooting
 * @Date: 2025/9/3 15:40
 */
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.csrf().disable() // 关闭 csrf
                .authorizeRequests()
                .anyRequest().permitAll(); // 放行所有请求
    }
}
